package com.weifangfirecontrolformal.weifangfirecontrolformal.web.service.check.hiddendanger;

import cn.hutool.json.JSONObject;
import com.weifangfirecontrolformal.weifangfirecontrolformal.common.base.BaseService;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.model.RespEntity;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.utils.requestutil.HttpRequestUtil;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class HiddendangerService extends BaseService {

	private static final Logger logger = LoggerFactory.getLogger(HiddendangerService.class);


	/**
	 * 隐患列表
	 * @param
	 * @return
	 */
	public RespEntity hiddendangerListPage(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"checkJava","hiddendangerListPage","hiddendanger");
	}

	/**
	 * 隐患新增
	 * @param
	 * @return
	 */
	public RespEntity add(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"checkJava","add","hiddendanger");
	}

	/**
	 * 隐患修改
	 * @param
	 * @return
	 */
	public RespEntity update(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"checkJava","update","hiddendanger");
	}

	/**
	 * 隐患详情
	 * @param
	 * @return
	 */
	public RespEntity detail(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"checkJava","detail","hiddendanger");
	}
	/**
	 * 监管账号隐患新增、更新
	 * @param
	 * @return
	 */
	public RespEntity orgHiddenDangerAddOrUpdate(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"checkJava","orgHiddenDangerAddOrUpdate","hiddendanger");
	}

	/**
	 * 监管账号隐患详情
	 * @param
	 * @return
	 */
	public RespEntity orgHiddenDangerDetails(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"checkJava","orgHiddenDangerDetails","hiddendanger");
	}

	/**
	 * 监管账号隐患删除
	 * @param
	 * @return
	 */
	public RespEntity orgHiddenDangerDel(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"checkJava","orgHiddenDangerDel","hiddendanger");
	}
}
